/*
 * Capota.fx
 * Created on 04/03/2009
 */

package changecolor.model;

/**
 * @author José Corcuera
 */

import javafx.scene.effect.ColorAdjust;
import javafx.scene.Node;
import javafx.scene.shape.Shape;
import javafx.scene.shape.ShapeSubtract;
import javafx.scene.paint.Color;

/**
 * @author José Corcuera
 */

public class CarPart{
    public var node: Node;
    public var shapeplus: Shape[];
    public var shapeless: Shape[];
    public var hue:Number = -1;
    public var saturation:Number = 1 ;
    public var brightness:Number = 0;
    public var contrast:Number = 1;

    init{
        node = ShapeSubtract{
            fill:Color.GRAY
            a: shapeplus
            b: shapeless
        }
        node.effect = ColorAdjust{
            hue: bind hue
            saturation: bind saturation
            brightness:bind brightness
        }
        node.opacity = 0.4
    }

}
